home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / Concept3D / Source / Includes / C3DObjects.hh < prev    next >
Encoding:
Text File  |  2000-06-24  |  1.5 KB  |  87 lines

  1. /*    =============
  2.  *    C3DObjects.hh
  3.  *    =============
  4.  *    
  5.  *    Implemented by C3DObjects.cc
  6.  */
  7.  
  8. #ifndef C3DOBJECTS_HH
  9. #define C3DOBJECTS_HH
  10.  
  11. #include "C3DTypes.hh"
  12. #include "C3DMatrix.hh"
  13. #include "C3DGeometry.hh"
  14.  
  15. class C3DContext {
  16. public:
  17.     // list of objects
  18. };
  19.  
  20. class C3DSubcontext : public C3DContext {
  21. public:
  22.     C3DOrientation orient;
  23.     double magnification;
  24.     double opacity;
  25. };
  26.  
  27. class C3DSpace : public C3DContext {
  28. public:
  29. };
  30.  
  31. class C3DObject {
  32. public:
  33.     C3DContext *context;
  34.     C3DPoint loc;
  35. public:
  36.     void Translate(double dx, double dy, double dz);
  37.     void Translate(const C3DVector &inVector);
  38.     void Yaw(double dtheta);
  39.     void Pitch(double dphi);
  40.     void Roll(double dpsi);
  41. };
  42.  
  43. class C3DThing : public C3DObject {
  44. public:
  45.     //C3DOrientation orient;
  46.     C3DTransform xform;
  47.     C3DTransform inverse;
  48. public:
  49.     void Translate(double dx, double dy, double dz);
  50.     void Yaw(double dtheta);
  51.     void Pitch(double dphi);
  52.     void Roll(double dpsi);
  53.     void Scale(double factor);
  54. };
  55.  
  56. class C3DCamera : public C3DThing {
  57. public:
  58.     virtual void WorldToEye(const C3DPoint &inPt, C3DPoint &outPt);
  59.     virtual bool EyeToPort(const C3DPoint &inPt, C3DPoint &outPt);
  60. public:
  61.     double viewAngle;
  62. };
  63.  
  64. class C3DDot : public C3DObject {
  65. public:
  66.     C3DColor color;
  67. };
  68.  
  69. class C3DLineSegment : public C3DObject {
  70. public:
  71.     C3DLine loc;
  72.     C3DColor color;
  73. };
  74.  
  75. class C3DPane : public C3DObject {
  76. public:
  77.     C3DPlane plane;
  78.     double top, left, bottom, right;
  79. };
  80.  
  81. class C3DComposite : public C3DObject {
  82. public:
  83.     C3DSubcontext subcontext;
  84. };
  85.  
  86. #endif
  87.